<?php
class Staticizer_News_Latest extends Staticizer
{
    public function Build($param=NULL)
    {
        #获取数据
        $data=DB::GetRows('select Title,M_HTMLFile from news order by Datetime desc');

        #处理数据
        foreach($data as &$row)
        {
            $row['M_HTMLFile']=Config::PATH_RELATIVE_CONTENT_NEWS.'/'.$row['M_HTMLFile'];
        }

        #渲染模板       
        View::Assign('News',$data);
        
        #生成静态
        $this->Save('news/public.latest.html',View::Fetch('news/public.latest.tpl'));
    }
}
?>